package cn.kpi.dao.pingyou;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import cn.kpi.common.persistence.MyBatisDao;
import cn.kpi.entity.pingyou.ByUserEntity;
import cn.kpi.entity.pingyou.NdkhStatsEntity;
import cn.kpi.entity.pingyou.UserNdkhEntity;

@MyBatisDao
public interface NdkhpsDao {
	public List<Map> GetPjOrgSumList(@Param("where") String where, @Param("year") int year)throws Exception;
	
	public List<UserNdkhEntity> GetNdkhpsListByWhere(@Param("where") String where, @Param("realname") String realname, @Param("year") int year, @Param("beginrow") int beginrow, @Param("endrow") int endrow)throws Exception;
	
	public int GetNdkhpsCountByWhere(@Param("where") String where, @Param("realname") String realname, @Param("year") int year)throws Exception;
	
	public ByUserEntity GetEntityByuserid(@Param("userid") long userid, @Param("orgid") long orgid, @Param("year") int year)throws Exception;
	
	public int DeleteNdkhDetail(@Param("orgid") long orgid, @Param("year") int year)throws Exception;
	public int DeleteNdkhOrg(@Param("orgid") long orgid, @Param("year") int year)throws Exception;
	
	public int InsertNdkhDetail(ByUserEntity entity)throws Exception;
	public int InsertOrgStatus(ByUserEntity entity)throws Exception;
	
	public UserNdkhEntity GetNdkhpsEntityByUserid(@Param("ndkhpsid") long ndkhpsid)throws Exception;
	public int UpdateNdkhDetail(@Param("ndkhpsid") long ndkhpsid, @Param("ndkhpsjg") String ndkhpsjg, @Param("remark") String remark)throws Exception;
	
	public int UpdateNdkhOrgTj(NdkhStatsEntity entity)throws Exception;
	public int UpdateNdkhOrgGd(NdkhStatsEntity entity)throws Exception;
	public int UpdateNdkhOrgBh(NdkhStatsEntity entity)throws Exception;
	
	public int UpdateNdkhDetailStatus(@Param("orgid") long orgid, @Param("year") int year, @Param("status") int status)throws Exception;

}
